/*
 * Copyright© 2003-2019 浙江汇信科技有限公司, All Rights Reserved. 
 */
package com.icinfo.cloud.provider.punish.dw.controller;

import com.icinfo.cloud.common.core.page.PageResponse;
import com.icinfo.cloud.provider.punish.dw.dto.DwCaseCountQueryDto;
import com.icinfo.cloud.provider.punish.dw.service.IDwCaseOrgDailyService;
import com.icinfo.cloud.provider.punish.dw.vo.DwCaseOrgDailyVo;
import com.icinfo.framework.common.web.Result;
import com.icinfo.framework.core.web.BaseController;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 描述: 机构案件每日统计更新 dw_case_org_daily 对应的Controller类.<br>
 *
 * @author framework generator
 * @date 2022年05月27日
 */
@RestController
@RequestMapping("/dw")
public class DwCaseOrgDailyController extends BaseController {
    /**
     * 日志记录器
     */
    private static final Logger logger = LoggerFactory.getLogger(DwCaseOrgDailyController.class);

    @Resource
    private IDwCaseOrgDailyService dwCaseOrgDailyService;

    /**
     * test
     * @param
     * @return
     *
     */
    @PostMapping("/test01")
    public void test01(){
        dwCaseOrgDailyService.statisticsCaseInfo();
        //evidenceInventoryService.saveAppraisalDoc();
    }

    /**
     * 查询每日统计数据
     * @param
     * @return
     *
     */
    @PostMapping("/getCaseCountList")
    public Result<PageResponse<DwCaseOrgDailyVo>> getList(@RequestBody @Validated DwCaseCountQueryDto dto){
        List<DwCaseOrgDailyVo> vos = dwCaseOrgDailyService.getPageList(dto);
        return Result.success("success", new PageResponse(vos));
    }
}